package com.user.applaction;

import com.user.command.AbstractCommandFactory;
import com.user.command.Command;
import com.user.pojo.User;
import com.user.tool.Tool;

public class UserApp {

	public static void main(String[] args) {

		Tool.printMsg("Welcome to User-Manager! \nYou can input 'help' to view command.");
		while (true) {
			Command command = AbstractCommandFactory.buildFactory(getUser()).buildCommand(Tool.askUserInput());
			command.excute();
		}
	}

	public static User getUser() {
		return User.getInstance();
	}
}
